package com.dingding.service.user.auth.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.util.ToolUtil;
import com.dingding.facade.user.dto.order.ReqSyncDriverAuthDTO;
import com.dingding.facade.user.dto.order.ResSyncDriverAuthDTO;
import com.dingding.service.user.auth.dao.ISyncDriverAuthDao;
import com.dingding.service.user.auth.service.ISyncDriverAuthService;
/**
 * 
 * @Description:同步车主认证状态
 * @author ligang
 * @date 2016年11月22日 下午7:24:28
 * @since 2.5.6
 */

@Component("syncDriverAuthService")
public class SyncDriverAuthServiceImpl implements ISyncDriverAuthService{

	@Resource(name="syncDriverAuthDao")
	ISyncDriverAuthDao syncDriverAuthDao;
	
	/**
	 * @Description:同步车主的认证状态
	 * @author:ligang
	 * @data 2016年11月22日 下午7:25:15
	 */
	@Override
	@Transactional(readOnly = true)
	public ResSyncDriverAuthDTO selectSyncDriverAuth(ReqSyncDriverAuthDTO reqSyncDriverAuthDTO) {
		
		// 客户端请求Bean非空判断
		if(reqSyncDriverAuthDTO == null || ToolUtil.isBlank(reqSyncDriverAuthDTO.getLoginId())){
			return null;
		}
		
		return syncDriverAuthDao.selectSyncDriverAuth(reqSyncDriverAuthDTO);
		
	}
	
}
